package com.code.modules.base.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author MyBatisPlus
 * @since 2021-10-19
 */
@ApiModel(description="用户表")
@TableName("ms_user")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value="主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户头像
     */
    @ApiModelProperty(value="用户头像")
    private String avatar_url;
    /**
     * 账号
     */
    @ApiModelProperty(value="账号")
    private String username;
    /**
     * 密码MD5(密码+盐)
     */
    @ApiModelProperty(value="密码MD5(密码+盐)")
    private String password;
    /**
     * md5密码盐
     */
    @ApiModelProperty(value="md5密码盐")
    private String salt;
    /**
     * 昵称
     */
    @ApiModelProperty(value="昵称")
    private String nick_name;
    /**
     * 用户真名
     */
    @ApiModelProperty(value="用户真名")
    private String real_name;
    /**
     * 性别（1：男 2：女）
     */
    @ApiModelProperty(value="性别（1：男 2：女）")
    private Integer user_sex;
    /**
     * 电子邮件
     */
    @ApiModelProperty(value="电子邮件")
    private String email;
    /**
     * 电话
     */
    @ApiModelProperty(value="电话")
    private String phone;
    /**
     * 个人简介
     */
    @ApiModelProperty(value="个人简介")
    private String user_address;
    /**
     * 个人简介
     */
    @ApiModelProperty(value="个人简介")
    private String summary;
    /**
     * 状态(1：启用 2：冻结）
     */
    @ApiModelProperty(value="状态(1：启用 2：冻结）")
    private Integer status;
    /**
     * 标记
     */
    @ApiModelProperty(value="标记")
    private Integer uflag;
    /**
     * 创建来源(1.web 2.android 3.ios 4.win 5.macos 6.ubuntu)
     */
    @ApiModelProperty(value="创建来源(1.web 2.android 3.ios 4.win 5.macos 6.ubuntu)")
    private Integer create_where;
    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createtime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updatetime;
    /**
     * 扩展字段
     */
    @ApiModelProperty(value="扩展字段")
    private String ext;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAvatar_url() {
        return avatar_url;
    }

    public void setAvatar_url(String avatar_url) {
        this.avatar_url = avatar_url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getNick_name() {
        return nick_name;
    }

    public void setNick_name(String nick_name) {
        this.nick_name = nick_name;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public Integer getUser_sex() {
        return user_sex;
    }

    public void setUser_sex(Integer user_sex) {
        this.user_sex = user_sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUser_address() {
        return user_address;
    }

    public void setUser_address(String user_address) {
        this.user_address = user_address;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getUflag() {
        return uflag;
    }

    public void setUflag(Integer uflag) {
        this.uflag = uflag;
    }

    public Integer getCreate_where() {
        return create_where;
    }

    public void setCreate_where(Integer create_where) {
        this.create_where = create_where;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
        ", id=" + id +
        ", avatar_url=" + avatar_url +
        ", username=" + username +
        ", password=" + password +
        ", salt=" + salt +
        ", nick_name=" + nick_name +
        ", real_name=" + real_name +
        ", user_sex=" + user_sex +
        ", email=" + email +
        ", phone=" + phone +
        ", user_address=" + user_address +
        ", summary=" + summary +
        ", status=" + status +
        ", uflag=" + uflag +
        ", create_where=" + create_where +
        ", createtime=" + createtime +
        ", updatetime=" + updatetime +
        ", ext=" + ext +
        "}";
    }
}
